//
//  SCIntegralGoodsCell.m
//  shangcheng
//
//  Created by 张艳江 on 2019/5/29.
//  Copyright © 2019 张艳江. All rights reserved.
//

#import "SCIntegralGoodsCell.h"

@implementation SCIntegralGoodsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.goodsImage.contentMode = UIViewContentModeScaleAspectFill;
    self.goodsImage.clipsToBounds = YES;
    
    self.layer.cornerRadius = 3;
    self.clipsToBounds = YES;
}
- (void)setModel:(SCModel *)model{
    _model = model;
    [self.goodsImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",Goods_ImageURL,model.wap_pic]] placeholderImage:[UIImage imageNamed:@""]];
    
    if (model.goods_id != nil) {
        self.goodsNameLab.text = model.goods_name;
        self.goodsIntegralLab.text = [NSString stringWithFormat:@"¥%@",model.goods_price];
        self.integralImage.hidden = YES;
        self.goodsIntegral_left.constant = 7;
    }else{
        self.goodsNameLab.text = model.gift_name;
        self.goodsIntegralLab.text = model.payment_pure_integral;
    }
}

@end
